Declare Function GetTempDrive Lib "Kernel" (ByVal cDriveLetter As Integer) As Integer
Declare Function GetTempFileName Lib "Kernel" (ByVal cDriveLetter As Integer, ByVal lpPrefixString As String, ByVal wUnique As Integer, ByVal lpTempFileName As String) As Integer
Sub Command1_Click ()
X% = 0
TempDrive% = GetTempDrive%(X%)
Text1.Text = Chr$(TempDrive% Mod 256) + Chr$(TempDrive% \ 256)